]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: call delay on context when approving a FT or call
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 26 Sep 2011 08:51:10 +0000 (10:51 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 26 Sep 2011 12:49:21 +0000 (14:49 +0200)
Not doing so is considered as a bug as we don't accept the context right away.
It leads to tp-glib returning directly from the AddDispatchOperation() D-Bus
call and so automatically approve the channel if the Shell is the only
approver running.

https://bugzilla.gnome.org/show_bug.cgi?id=660084

js/ui/telepathyClient.js

index 4bd5097f4dc55e179d448683f010685447641ffc..43e1423174496d136d499301edfae8a965f50f38 100644 (file)
@@ -305,6 +305,8 @@ Client.prototype = {
         Shell.get_tp_contacts(conn, [targetHandle],
                 contactFeatures,
                 Lang.bind(this, this._createAudioVideoSource, channel, context, dispatchOp));
+
+        context.delay();
     },
 
     _createAudioVideoSource: function(connection, contacts, failed, channel, context, dispatchOp) {
@@ -338,6 +340,8 @@ Client.prototype = {
         Shell.get_tp_contacts(conn, [targetHandle],
                 contactFeatures,
                 Lang.bind(this, this._createFileTransferSource, channel, context, dispatchOp));
+
+        context.delay();
     },
 
     _createFileTransferSource: function(connection, contacts, failed, channel, context, dispatchOp) {